import { createApp } from 'vue'
// import Cookies from 'js-cookie'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import '@/assets/styles/index.scss' // global css
import '@/styles/main.scss'

import App from './App.vue'
// import store from './store'
import { createPinia } from "pinia"
import router from './router/index'
// import directive from './directive' // directive
import i18n from './locales'

import plugins from './plugins' // plugins
// import { download } from '@/utils/request'
// svg图标
import 'virtual:svg-icons-register' // router svg 图标
import SvgIcon from '@/components/SvgIcon/index.vue'
import elementIcons from '@/components/SvgIcon/svgicon.ts'

import './permission' // permission control

import { organizationEqbOrderInfo } from '@/api/EQianBao/index'

const app = createApp(App);
const pinia = createPinia()
app.config.warnHandler = () => null

app.use(router)
  // .use(store)
  .use(pinia)
  .use(plugins)
  .use(elementIcons)
  .use(i18n)
  .use(ElementPlus)
  .component('svg-icon', SvgIcon)
// app.directive('email',formVerification.email)
app.config.globalProperties.$common = organizationEqbOrderInfo

app.mount('#app')

// 卸载应用
// window.unmount = () => {
//   app.unmount()
// }
// if (process.env.NODE_ENV === 'production') {
//   window.debugger = function() {}; // 覆盖 debugger
//   console.debug = function() {};   // 覆盖 console.debug
//   console.log = function() {}; 
// }
